Learn R Programming

Rfast (version 1.5)

Many F-tests: Many F-tests

Description

It performs very many F-tests.

Usage

ftests(x, ina)

Arguments

x
A matrix with the data, where the rows denote the samples (and the two groups) and the columns are the variables.
ina
A numerical vector with 1s, 2s, 3s and so one indicating the two groups. Be careful, the function is desinged to accept numbers greater than zero.

Value

A matrix with the test statistic and the p-value of each test.

Details

The Welch's F-test (without assuming equal variances) is performed.

References

B. L. Welch (1951). On the comparison of several mean values: an alternative approach. Biometrika, 38(3/4), 330-336.

See Also

ttests, colVars

Examples

Run this code
## 100000 variables, hence 100000 F-tests will be performed
x = matrix( rnorm(100 * 10000), ncol = 10000 )
## 100 observations in total
ina = rbinom(100, 3, 0.6) + 1   ## independent samples t-test
system.time( ftests(x, ina) ) 

Run the code above in your browser using DataLab